package cn.flant.cmd;

public class MyResponseBuilder implements ResponseBuilder {

	@Override
	public String build(Request request, Response response, Object content) throws Exception {
		StringBuilder sb = new StringBuilder();
		for (String key : response.getParamKeys()) {
			sb.append(key).append("=").append(response.getStringParam(key, "")).append("\r\n");
		}
		sb.append("message=").append(content).append("\r\n");
		sb.append(request.getSourceRequest()).append("\r\n");
		sb.append("(finished)");
		return sb.toString();
	}

}
